package com.axsoft.jobimp.tests;

import junit.framework.TestCase;

import com.axsoft.jobimp.BexFactory;
import com.axsoft.jobimp.types.BLK;

/**
 * 
 * @author RankoR
 *
 * Test for BexFactory
 */
public class BexFactoryTest extends TestCase {

	public void testCreateBexFromSTld() {
		final BLK blk = BexFactory.create_OBIMP_BEX_COM_CLI_HELLO("jobimp");
		
		final byte[] bytes = {  0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
								0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								0x0E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
								0x06, 0x6A, 0x6F, 0x62, 0x69, 0x6D, 0x70 };
		
		assertTrue(OTestUtils.byteArraysEquals(blk.getData(), bytes));
		
	}
	
}
